<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>课程发布</title>
<jsp:include page="/wjh/include/head.jsp"/>
  <script type="text/javascript">
	$(document).ready(function(){
		changeIndex("发布");
	});
	function publish(bn){
		$("form").submit();
		$(bn).attr("disabled","disabled").html("发布中");
	}
	
</script>
</head>
<body>

<form action="/blog/addBlog" role="form" method="post">
	<div style="height: 10px;"></div>
	<div class="container">
		<div class="panel panel-default">
			<div class="panel-heading">
				发布课程
			</div>
			<div class="panel-body">
				<div class="row">
					<div class="col-md-8">
						<div class="alert alert-warning">字段错误</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-4 ">
						
						<div class="input-group">
				            <span class="input-group-addon">课程名称</span>
				            <input name="title"  type="text" class="form-control" placeholder="5-15个字">
				        </div><br/>
				        <div class="input-group">
				            <span class="input-group-addon">地点</span>
				            <input name="title" type="text" class="form-control" placeholder="5-15个字">
				        </div>
				        <br/>
				         <div class="input-group">
				           <span class="input-group-addon">教师</span>
				         	 <select name="type.id" class="form-control" >
				         	 	 	<option>印度阿三</option>
				         	 		<option>小月月</option>
				         	 		<option>王思聪</option>
	                         </select>
                         </div><!--类别input-group  -->
                         <br/>
                          <div class="input-group">
				           <span class="input-group-addon">时间段</span>
				         	 <select name="type.id" class="form-control" >
				         	 	 	<option>上午第一节</option>
				         	 		<option>上午第二节</option>
				         	 		<option>下午第一节</option>
				         	 		<option>下午第二节</option>
	                         </select>
                         </div><!--时间段input-group  -->
                         <br/>
                          <div class="input-group">
				           <span class="input-group-addon">状态</span>
				         	 <select name="type.id" class="form-control" >
				         	 	 	<option>报名中</option>
				         	 		<option>结束报名</option>
				         	 		<option>未开始报名</option>
	                         </select>
                         </div><!--状态input-group  -->
                         
					</div><!-- col-md-5 -->
				</div><!-- row -->
				<div style="height: 10px;"></div>
				<h5 class="text-muted">课程介绍：</h5>
                <div class="editormd" style="z-index: 5" id="test-editormd">                
                 	<textarea  style="display:none;" name="content">${blog.content}</textarea>
           		</div>
				<div style="height: 5px;"></div>
				<button type="button" onclick="publish(this)" class="btn btn-default">发布</button>
				
			</div><!-- panel-body -->
		</div><!-- panel -->
	</div>
</form>

<script type="text/javascript">
	var testEditor;
	$(function() {
		testEditor = editormd("test-editormd", {
			width : "100%",
			height : 640,
			syncScrolling : "single",
			path : "/plugins/editor/lib/",
			toolbarIcons : function() {
				 return editormd.toolbarModes["simple"];
			 },
			 watch:false,
		  	imageUpload : true,
             imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
             imageUploadURL : "./php/upload.php?test=dfdf",
		});
	});
</script>
</body>
</html>